package com.ccys.app.controller;


import com.alibaba.fastjson.JSONObject;
import com.ccys.app.service.MemberPreAuthenticationService;
import com.ccys.app.service.MemberService;
import com.ccys.common.constants.ContextConstants;
import com.ccys.common.constants.TouristApi;
import com.ccys.common.vo.ResponseResult;

import com.ccys.db.dto.login.LoginDto;
import com.ccys.db.dto.web.base.SysUserDto;
import com.ccys.db.vo.member.LoginVO;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;

import javax.servlet.http.HttpServletRequest;


@RestController
@Api(tags = "登录")
public class LoginController {

    @Autowired
    private MemberPreAuthenticationService memberPreAuthenticationService;

    @TouristApi
    @ApiOperation("登录")
    @PostMapping(value = "/Login")
    @ApiResponses({
            @ApiResponse(code = 411, message = ContextConstants.DESC_411),
            @ApiResponse(code = 200, message = ContextConstants.MODEL_DESC,response = JSONObject.class),
    })
    public Object login(LoginDto dto){
        return this.memberPreAuthenticationService.login(dto);
    }




}
